package com.haobangs.imms.controller;


import com.haobangs.imms.service.IControDeviceService;
import com.ruoyi.common.core.controller.BaseController;
import java.util.ArrayList;

import com.ruoyi.common.core.domain.AjaxResult;
import org.json.JSONException;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;


/**
 * 反控管理Controller
 *
 * @author haobangs
 * @date 2024-03-23
 */
@RestController
@RequestMapping("/imms/control")
public class ContolDeviceContoller extends BaseController
{
    @Autowired
    private IControDeviceService ControDeviceService;
    /**
     * 查询反控列表
     */
    @GetMapping("/getlist")
    public AjaxResult getList() throws JSONException {
        return (AjaxResult.success(ControDeviceService.getAlarmlist())) ;
    }

    /**
     * 进行返控
     */
    @GetMapping("/id")
    public AjaxResult getList(String deviceSerialNumber)
    {
        return AjaxResult.success( ControDeviceService.Controldevice(deviceSerialNumber));
    }

}
